#pragma once

#include "llvm/Module.h"
#include "llvm/Function.h"
#include "llvm/BasicBlock.h"
#include "llvm/Instruction.h"
#include "llvm/Type.h"
#include "llvm/DerivedTypes.h"
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/Instructions.h"
#include "llvm/Support/raw_ostream.h"
#include "Utils.h"
#include <vector>
#include <map>

using namespace llvm;
using namespace std;

class Callable
{
public:
	Callable(Module *M, const Type *RetType);
	Callable& AddType(const Type* Ty);
	void Map(void *Ptr, ExecutionEngine *EE, const char *Name);
	CallInst* Call(Value *Params[], Instruction *InsertAfter); // maybe this should be InsertBefore
private:
	Module *M;
	const Type *RetType;
	vector<const Type*> ArgTys;
	Function *Func;
};
